package com.banch.cloud.stream.controller;

import com.banch.cloud.stream.service.IMessageProducer;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * send message
 *
 * @author banch
 * @version 1.0
 * @date 2020/7/24
 */
@RequestMapping(value = "/message")
@Controller
public class SendMessageController {

    @Resource
    private IMessageProducer messageProducer;

    @ResponseBody
    @GetMapping(value = "/send")
    public String sendMessage() {
        return messageProducer.send();
    }


}